import pandas as pd

ser_obj = pd.Series([10, 20, 30, 40, 50],
                    index=['row1', 'row2', 'row3', 'row4', 'row5'])

# 根据单个标签索引获取 ser_obj 单个数据
result = ser_obj.loc['row2']
# print(result)
# print(ser_obj.loc[['row2', 'row5']])
print(ser_obj.loc['row3': 'row5'])